-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MainThreadMonitor
: fixed flakiness in CI
#2517
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/11230/workflows/78444bf6-22b8-40fc-ad92-1f29279377d0/jobs/69663 This is meant to detect deadlocks. 1 second is unfortunately too low for CI with limited resources.
Codecov Report
@@ Coverage Diff @@
## main #2517 +/- ##
==========================================
- Coverage 87.83% 87.82% -0.01%
==========================================
Files 199 199
Lines 13647 13647
==========================================
- Hits 11987 11986 -1
- Misses 1660 1661 +1 |
joshdholtz
approved these changes
May 19, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
NachoSoto
added a commit
that referenced
this pull request
May 25, 2023
Fixes https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/11230/workflows/78444bf6-22b8-40fc-ad92-1f29279377d0/jobs/69663 This is meant to detect deadlocks. 1 second is unfortunately too low for CI with limited resources.
This was referenced May 31, 2023
NachoSoto
added a commit
that referenced
this pull request
Jun 15, 2023
See also #2517. We keep getting flaky failures with this in CI, which is annoying because it marks the whole test run as failed and it doesn't retry. The reason for that is because we have to use `fatalError` and can't use `fail()` because this detection has to happen outside the main thread. If the main thread is blocked, well, we can't rely `XCTest` to run in the main thread. Ultimately, we can't guarantee that CI machines will be fast enough to ensure they don't get blocked. The purpose of this class was to detect deadlocks. By increasing it to 30 seconds, we pretty much avoid flaky failures for slow CI machines, but still have the ability to detect if the main thread is deadlocked due to a locking issue.
NachoSoto
added a commit
that referenced
this pull request
Jun 15, 2023
See also #2517. We keep getting flaky failures with this in CI, which is annoying because it marks the whole test run as failed and it doesn't retry. The reason for that is because we have to use `fatalError` and can't use `fail()` because this detection has to happen outside the main thread. If the main thread is blocked, well, we can't rely `XCTest` to run in the main thread. Ultimately, we can't guarantee that CI machines will be fast enough to ensure they don't get blocked. The purpose of this class was to detect deadlocks. By increasing it to 30 seconds, we pretty much avoid flaky failures for slow CI machines, but still have the ability to detect if the main thread is deadlocked due to a locking issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/11230/workflows/78444bf6-22b8-40fc-ad92-1f29279377d0/jobs/69663
This is meant to detect deadlocks. 1 second is unfortunately too low for CI with limited resources.